import { getAction, postAction } from '@/api/manage'

// 岗位列表
const list = (params) => getAction('/admin/post/page', params)
// 全部岗位
const all = (params) => getAction('/admin/post/all', params)
// 删除岗位
const del = (params) => postAction(`/admin/post/delete/${params}`)
// 批量删除岗位
const batchDel = (params) => postAction(`/admin/post/batchDel`, params)
// 新增岗位
const create = (params) => postAction('/admin/post/create', params)
// 编辑岗位
const edit = (params) => postAction('/admin/post/update', params)
// 导出岗位
const exports = (params) => postAction('/admin/post/export', params, 'blob')
// 下载岗位模板
const download = (params) => postAction('/admin/post/download', params, 'blob')
// 导入岗位
const imports = (params) => postAction('/admin/post/import', params)

export {
  list,
  all,
  del,
  batchDel,
  create,
  edit,
  exports,
  download,
  imports
}
